#include <QtGui/QApplication>
#include <QtDeclarative>
#include "qmlapplicationviewer.h"
#include "cbaralho.h"
#include "ccore.h"

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QApplication> app(createApplication(argc, argv));
    QScopedPointer<QmlApplicationViewer> viewer(QmlApplicationViewer::create());
    int i = 0;
    CMesa *mesa = new CMesa();
    mesa->setTipoJogo(CMesa::E_2x2);
    while (i < 1000) {
        mesa->NovaRodada();
        i++;
    }
    CBaralho *baralho = new CBaralho();
    viewer->engine()->addImageProvider("baralho", baralho);
    viewer->setMainQmlFile(QLatin1String("qml/roTruco/main.qml"));
    viewer->showExpanded();
    return app->exec();
}
